home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
graphics
/
scalemd2.frm
< prev
next >
Wrap
Text File
|
1993-05-16
|
7KB
|
225 lines
VERSION 2.00
Begin Form Form2
Caption = "Scalemode Setting"
ClientHeight = 3840
ClientLeft = 3690
ClientTop = 2775
ClientWidth = 3975
Height = 4245
Left = 3630
LinkMode = 1 'Source
LinkTopic = "Form2"
ScaleHeight = 3840
ScaleWidth = 3975
Top = 2430
Width = 4095
Begin CommandButton cmdDone
Caption = "&Done"
Height = 495
Left = 2160
TabIndex = 18
Top = 2760
Width = 1215
End
Begin CommandButton cmdRescale
Caption = "&Rescale"
Default = -1 'True
Height = 495
Left = 2160
TabIndex = 17
Top = 2040
Width = 1215
End
Begin TextBox txtScale
Height = 375
Index = 3
Left = 3240
TabIndex = 16
Top = 1440
Width = 615
End
Begin TextBox txtScale
Height = 375
Index = 2
Left = 3240
TabIndex = 15
Top = 1080
Width = 615
End
Begin TextBox txtScale
Height = 375
Index = 1
Left = 3240
TabIndex = 14
Top = 720
Width = 615
End
Begin TextBox txtScale
Height = 375
Index = 0
Left = 3240
TabIndex = 13
Top = 360
Width = 615
End
Begin Frame Frame1
Caption = "Scale Mode"
Height = 3255
Left = 120
TabIndex = 0
Top = 360
Width = 1695
Begin OptionButton optScaleMode
Caption = "Centimeters"
Height = 375
Index = 7
Left = 120
TabIndex = 8
Top = 2760
Width = 1335
End
Begin OptionButton optScaleMode
Caption = "Millimeters"
Height = 375
Index = 6
Left = 120
TabIndex = 7
Top = 2400
Width = 1335
End
Begin OptionButton optScaleMode
Caption = "Inches"
Height = 375
Index = 5
Left = 120
TabIndex = 6
Top = 2040
Width = 1335
End
Begin OptionButton optScaleMode
Caption = "Character"
Height = 375
Index = 4
Left = 120
TabIndex = 5
Top = 1680
Width = 1335
End
Begin OptionButton optScaleMode
Caption = "Pixels"
Height = 375
Index = 3
Left = 120
TabIndex = 4
Top = 1320
Width = 1455
End
Begin OptionButton optScaleMode
Caption = "Points"
Height = 375
Index = 2
Left = 120
TabIndex = 3
Top = 960
Width = 1455
End
Begin OptionButton optScaleMode
Caption = "Twips"
Height = 375
Index = 1
Left = 120
TabIndex = 2
Top = 600
Width = 1455
End
Begin OptionButton optScaleMode
Caption = "User-defined"
Height = 375
Index = 0
Left = 120
TabIndex = 1
Top = 240
Width = 1455
End
End
Begin Label lblScale
Caption = "Scale Height:"
Height = 255
Index = 3
Left = 1920
TabIndex = 12
Top = 1560
Width = 1215
End
Begin Label lblScale
Caption = "Scale Width:"
Height = 255
Index = 2
Left = 1920
TabIndex = 11
Top = 1200
Width = 1215
End
Begin Label lblScale
Caption = "Scale Top:"
Height = 255
Index = 1
Left = 1920
TabIndex = 10
Top = 840
Width = 1215
End
Begin Label lblScale
Caption = "Scale Left"
Height = 255
Index = 0
Left = 1920
TabIndex = 9
Top = 480
Width = 1215
End
End
Dim SelScaleMode As Integer
Sub cmdDone_Click ()
End
End Sub
Sub cmdRescale_Click ()
optScaleMode_Click SelScaleMode
End Sub
Sub Form_Load ()
'Initialize Controls
Form2.txtScale(0).Text = Str$(frmScaleMode.picDraw.ScaleLeft)
Form2.txtScale(1).Text = Str$(frmScaleMode.picDraw.ScaleTop)
Form2.txtScale(2).Text = Str$(frmScaleMode.picDraw.ScaleWidth)
Form2.txtScale(3).Text = Str$(frmScaleMode.picDraw.ScaleHeight)
Form2.optScaleMode(frmScaleMode.picDraw.ScaleMode).Value = True
End Sub
Sub optScaleMode_Click (Index As Integer)
If Index = 0 Then
frmScaleMode.picDraw.ScaleLeft = Val(txtScale(0).Text)
frmScaleMode.picDraw.ScaleTop = Val(txtScale(1).Text)
frmScaleMode.picDraw.ScaleWidth = Val(txtScale(2).Text)
frmScaleMode.picDraw.ScaleHeight = Val(txtScale(3).Text)
End If
frmScaleMode.picDraw.ScaleMode = Index
oldCursorX = frmScaleMode.picDraw.ScaleLeft
oldCursorY = frmScaleMode.picDraw.ScaleTop
frmScaleMode.picDraw.Refresh
frmScaleMode.picXaxis.Refresh
frmScaleMode.picYAxis.Refresh
frmScaleMode.picDraw.Tag = ""
Form2.txtScale(0).Text = Str$(frmScaleMode.picDraw.ScaleLeft)
Form2.txtScale(1).Text = Str$(frmScaleMode.picDraw.ScaleTop)
Form2.txtScale(2).Text = Str$(frmScaleMode.picDraw.ScaleWidth)
Form2.txtScale(3).Text = Str$(frmScaleMode.picDraw.ScaleHeight)
SelScaleMode = Index
End Sub